package com.wwl.cms.utils.designModeTest.proxy.staticproxy;

/**
 * @author wwl
 * @version 1.0
 * @date 2021/9/8 18:56
 * @description:
 */
//代理对象静态代理
public class TeacherDaoProxy implements ITeacherDao {
    private ITeacherDao target;//目标对象，通过接口来聚合

    public TeacherDaoProxy(ITeacherDao target){
        this.target = target;
    }

    @Override
    public void teacher(){
        System.out.println("开始代理  完成某些操作。。。。。");
        target.teacher();
        System.out.println("提交。。。。。。");
    }
}
